package com.flyco.modules.sms.vo;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.flyco.common.aspect.annotation.Dict;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

@Data

public class SmsCouponVO implements Serializable {
    private static final long serialVersionUID = 1L;
    
	/**id*/
	@JsonSerialize(using= ToStringSerializer.class)
	private Long id;
	/**优惠卷类型；0->全场券；1->会员券；*/
	@Dict(dicCode = "coupon_apply_type")
	private Integer type;
	/**券名称*/
	private String name;
	/**使用平台：all->全部；app->app端；wap->移动端；pc->pc端；wx->微信小程序*/
	@Dict(dicCode = "coupon_platform")
	private String platform;
	/**数量*/
	private Integer count;
	/**金额/折扣*/
	private java.math.BigDecimal amount;
	/**每人限领张数*/
	private Integer perLimit;
	/**每个门店限领张数*/
	private Integer limitPerStore;
	/**使用门槛；0表示无门槛*/
	private java.math.BigDecimal minPoint;
	/**折扣券限制最高优惠金额*/
	private java.math.BigDecimal limitAmount;
	/**startTime*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private Date startTime;
	/**endTime*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private Date endTime;
	/**使用类型：0->全场通用；1->指定分类；2->指定商品*/
	@Dict(dicCode = "coupon_use_type")
	private Integer useType;
	/**备注*/
	private String note;
	/**发行数量*/
	private Integer publishCount;
	/**已使用数量*/
	private Integer useCount;
	/**领取数量*/
	private Integer receiveCount;
	/**可以领取的日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private Date enableTime;
	/**优惠码*/
	private String code;
	/**可领取的会员类型：0->无限时*/
	private Integer memberLevel;
	/**券类型 discount 优惠券／gift 赠品券 / rate 折扣券*/
	@Dict(dicCode = "coupon_type")
	private String couponType;
	/**券是否绑定用户，0不绑定，1绑定*/
	private Integer bindFlag;
	/**赠品券虚拟分组，组间共存，组内互斥*/
	private String giftGroup;
	/**赠品数据，json格式:[{"productSn":"FS871","quantity":2}]*/
	@TableField(updateStrategy = FieldStrategy.IGNORED)
	private Object giftData;
	/**创建人*/
	private String createBy;
	/**创建时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private Date createTime;
	/**更新人*/
	private String updateBy;
	/**更新时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private Date updateTime;

	private String grantUuid;
}
